<template>
  <div>
      <el-table :data="datas" style="width: 100%">
        <el-table-column
          label="#"
          type="index"
          width="180"
        >
        </el-table-column>
        <el-table-column
          label="名称"
          prop="name"
        >
        </el-table-column>
        <el-table-column
          label="路径"
          prop="path"
        >
        </el-table-column>
        <el-table-column
          label="级别"
          prop="level"
        >
          <template slot-scope="{row}">

            <el-tag type="primary" v-if="row.level == 0">一级</el-tag>
            <el-tag type="success" v-else-if="row.level == 1">二级</el-tag>
            <el-tag type="warning" v-else>三级</el-tag>
          </template>
        </el-table-column>
      </el-table>
  </div>
</template>

<script>
  export default {
    name: "RightsTable",
    data:function(){

      return {}
    },
    props:{
      datas:{
        type:Array,
        default:function () {

          return []
        }
      }
    },
    methods:{

    }
  }
</script>

<style scoped>

</style>
